package org.apache.service.impl;

import java.util.List;

import org.apache.dao.TeamDAO;
import org.apache.model.Team;
import org.apache.service.TeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TeamServiceImpl implements TeamService {

    @Autowired
    private TeamDAO teamDAO;

    public void addTeam(Team team) {

        teamDAO.addTeam(team);
    }

    public void updateTeam(Team team) {

        teamDAO.updateTeam(team);
    }

    public Team getTeam(Long id) {

        return teamDAO.getTeam(id);
    }

    public void deleteTeam(Long id) {

        teamDAO.deleteTeam(id);
    }

    public List<Team> getTeams() {

        return teamDAO.getTeams();
    }

}
